﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DataAccess;
using Model;
using System.Data.Entity;


namespace CodefirstFile
{
    class Program
    {
        static void Main(string[] args)
        {
            //Database.SetInitializer(new DropCreateDatabaseIfModelChanges<DataAccess.PortalContext>());

            var user = new Model.User()
            {
                UserID = 1,
                IsValid = true,
                Password = "123",
                UserName = "123",


            };


            using (var context = new DataAccess.PortalContext())
            {
                context.Users.Add(user);
                context.SaveChanges();

            }
            Console.WriteLine("ok");
            Console.ReadKey();
        }
    }
}
